home *** CD-ROM | disk | FTP | other *** search
- /* arexx Script
- */
-
- options results
- parse ARG Port b
-
- ADDRESS value Port
-
- pp_GetDepth
- D=result
- pp_GetWidth
- W=result
- pp_GetHeight
- H=result
-
- pp_CountFrames
- count=result
- IF count<2 then DO
- pp_Warn 'Make*an*Anim*first.'
- EXIT
- END
-
- pp_GetCurrentBuffer
- CBf=result
- pp_GetCurrentBrush
- B0=result
-
- if D<24 then DO
- pp_Psave "ram:palette.trash" 0
- END
-
- pp_FindEmptyBrush
- Brush=result
- if Brush=-1 then DO
- pp_Warn "can't*find*empty|Brush."
- EXIT
- END
- pp_SetBrush Brush
-
- pp_BufferGui "*SELECT*DESTINATION*"
- flag=result
- IF flag=-1 then DO
- EXIT
- END
-
- s0=1
- s1=Count
- ADDRESS value Port
- pp_DialogInit 250 80 "*Clone*Anim*" 2
- pp_Slider 0 100 5 100 16 "First*Frame*#" 1 1 count s0
- pp_Slider 1 100 25 100 16 "Last*Frame*#" 1 1 count s1
- pp_Dialog
- rc=result
- IF rc=0 THEN DO
- EXIT
- END
-
- pp_GetDialog 0
- s0=result
-
- pp_GetDialog 1
- s1=result
-
- pp_GotoFrame s0
-
- pp_SetBuffer flag
- pp_GetWidth
- if result~=0 then DO
- pp_Request "This*Buffer*is*not*empty.|Do*you*want*to*erase*it*?"
- if result=0 then DO
- EXIT
- END
- ELSE DO
- pp_ClearCurrentBuffer
- END
- END
-
- pp_new W H D
- pp_GetWidth
- IF result=0 then DO
- pp_Warn "Not*enough*memory."
- EXIT
- END
-
- IF D<24 then DO
- pp_Pload "ram:palette.trash"
- ADDRESS COMMAND
- 'delete >nil: ram:palette.trash'
- ADDRESS value Port
- END
-
- pp_AnimGui 1
- IF result<2 then DO
- EXIT
- END
-
- pp_MakeAnim (s1-s0)+1
- pp_CountFrames
- Count=result
- IF Count<2 then DO
- pp_Warn "Can't*create*animation."
- EXIT
- END
-
- pp_EffectOff
-
- DO i=1 to Count
- pp_SetBuffer CBf
- pp_PickBrush 0 0 W H 1
- pp_NextFrame
- pp_SetBuffer flag
- pp_Plot W/2 H/2
- pp_NextFrame
- END
-
- pp_FreeBrush
- pp_SetBrush B0
-
- EXIT
-
-
-
-
-
-